x ^ 0s = x;
x ^ 1s = ~x;
x ^ x = 0;
x & 0s = 0;
x & 1s = x;
x & x = x;
x | 0s = x;
x | 1s = 1s;
x | x = x;

boolean getBit(int num, int i)    //This is shifting 1 over by i bits, i is the number of bits it changes place.
  return (num & (1 << i) != 0);
  
int setBit(int num, int i)     //Set bit to 1 to be precise.              cool
  return num | (1 << i);
  
int clearBit(int num, int i){
  return num & (~(1 << i));  
}

int clearBitsMSBthroughI(int num, int i) {     //Mask is used to be & to the original number that both of them could be &ed.
  int mask = 1<<i -1;
  return mast & num;
}



